Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the fallback value bytes in getbit() #154

Closed
wants to merge 1 commit into from

Conversation

dsalisbury
Copy link

@dsalisbury dsalisbury commented Jul 3, 2017

Make the fallback value bytes in getbit() otherwise byte_to_int() will go bang if getbit(key, n) is called before setbit(key, n, v)

Specifically, I have a test which fails due to this:

b = '\x00'

    def byte_to_int(b):
        if isinstance(b, int):
            return b
>       raise TypeError('an integer is required')
E       TypeError: an integer is required

...otherwise byte_to_int() will go bang if getbit(key, n) is called
before setbit(key, n, v)
@bmerry
Copy link
Collaborator

bmerry commented Nov 10, 2017

This is also handled by #166.

@bmerry
Copy link
Collaborator

bmerry commented Nov 10, 2017

I've created a fork called fakenewsredis with a PyPI release to incorporate PRs that aren't getting traction here. I've included #166 (which supersedes this one) there.

@bmerry
Copy link
Collaborator

bmerry commented Mar 22, 2018

Closing because #166 has been merged into 0.10.1 (via the fakenewsredis fork).

@bmerry bmerry closed this Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants